<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>技术社区</title>
    <link rel="stylesheet" href="./static/element-plus/index.css">
    <script src="./static/js/vue.global.js"></script>
    <script src="./static/element-plus/index.full.js"></script>
    <style>
        /* 轮播图样式 */
       .el-carousel-item img {

            width: 80%;
            height: auto;
            /* 让图片在轮播项中居中显示 */
            display: block;
            margin: 0 auto;
        }

        /* 页脚链接样式 */
       .el-footer.el-link {
            color: #666;
            margin: 0 5px;
        }

        /* 版权信息行样式 */
       .copyright-row {
            background-color: lightblue;
            color: white;
            width: 100%;
            box-sizing: border-box;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 10px 0;
        }

        /* 版权信息段落样式 */
       .copyright-row p {
            margin: 0;
            text-align: center;
            color: black; /* 添加这一行，将文字颜色改为黑色 */
        }

        /* 调整轮播组件的高度，可按需调整 */
       .el-carousel {
            height: 600px;
        }
    </style>
</head>

<body>
    <div id="app">
        <el-container>
            <!-- 头部 -->
            <el-header>
                <el-row>
                    <el-col :span="4" style="display: flex; align-items: center;">
                        <img src="./static/images/logo.png" style="height: 60px" />
                        <h2 style="padding-left: 4px">技术社区</h2>
                    </el-col>
                    <el-col :span="8">
                        <el-menu :default-active="activeIndex" mode="horizontal" style="border-bottom: none;">
                            <el-menu-item index="1">首页</el-menu-item>
                            <el-menu-item index="2">资讯</el-menu-item>
                            <el-menu-item index="3">课程</el-menu-item>
                            <el-menu-item index="4">商城</el-menu-item>
                        </el-menu>
                    </el-col>
                    <el-col :span="8" style="height: 60px; line-height: 60px;" class="hidden-xs-only">
                        <el-input placeholder="请输入关键字"></el-input>
                    </el-col>
                    <el-col :span="4" style="text-align: right; height: 60px; line-height: 60px;" class="hidden-xs-only">
                        <el-link type="primary" @click="goToLogin">登录</el-link>
                        <el-link type="primary" style="padding-left: 4px" @click="goToRegister">注册</el-link>
                    </el-col>
                </el-row>
            </el-header>
            <!-- 主体 -->
            <el-main>
                <el-carousel height="600px">
                    <el-carousel-item>
                        <img src="./static/images/carousel1.png" width="2000" height="600"/>
                    </el-carousel-item>
                    <el-carousel-item>
                        <img src="./static/images/carousel2.png" width="2000" height="600"/>
                    </el-carousel-item>
                    <el-carousel-item>
                        <img src="./static/images/carousel3.png" width="2000" height="600"/>
                    </el-carousel-item>
                </el-carousel>
            </el-main>
            <!-- 页脚 -->
            <el-footer>
                <el-row>
                    <el-col :xs="24" :lg="8">
                        <div>
                            <img src="./static/images/logo.png" style="height: 100px" />
                        </div>
                        <div>
                            <h2>技术社区</h2>
                            <p>致力于构建一个专业的 IT 技术交流社区</p>
                        </div>
                    </el-col>
                    <el-col :xs="24" :lg="8">
                        <div>
                            <el-link type="primary">首页</el-link>
                            <el-link type="primary">资讯</el-link>
                            <el-link type="primary">课程</el-link>
                            <el-link type="primary">商城</el-link>
                        </div>
                        <div>
                            <el-link type="primary">关于我们</el-link>
                            <el-link type="primary">使用手册</el-link>
                            <el-link type="primary">隐私条款</el-link>
                            <el-link type="primary">建议反馈</el-link>
                        </div>
                    </el-col>
                    <el-col :xs="24" :lg="8">
                        <div>
                            <h2>联系我们</h2>
                            <p>电话：123456789</p>
                            <p>邮箱: software@develop.com</p>
                        </div>
                    </el-col>
                </el-row>
                <el-row class="copyright-row">
                    <p>软件开发工作室版权所有</p>
                </el-row>
            </el-footer>
        </el-container>
    </div>
    <script>
        var App = {
            data() {
                return {
                    activeIndex: '1',
                };
            },
            methods: {
                goToLogin() {
                    window.location.href = "/login.html"; // 跳转到登录页面
                },
                goToRegister() {
                    window.location.href = "/register.html"; // 跳转到注册页面
                }
            }
        };
        Vue.createApp(App).use(ElementPlus).mount("#app");
    </script>
</body>

</html>